Skip to content

Conversation

@ArloL
Copy link

@ArloL ArloL commented May 17, 2013

If you call getObject() directly on a FactoryBean it will create a memory leak because the bean is not managed by the application context.

Therefore I removed all calls to getObject() and let the context insert the dependency.

I tested this with my application using Tomcat 6 and jProfiler 6's Telemetry view. After a stop or undeploy the non-heap memory usage goes back down when running the GC.

jbrisbin added a commit that referenced this pull request Jun 12, 2013
Remove memory leaks of RepositoryRestMvcConfig
@jbrisbin jbrisbin merged commit fe21ccf into spring-projects:master Jun 12, 2013
@jbrisbin
Copy link
Contributor

Thanks for the PR!

@mikaelhg
Copy link

@ArloL can you verify that this leak is still gone in spring-data-rest 2.0.0.BUILD-SNAPSHOT?

http://static.gueck.com/tmp/4/spring-boot-data-rest-memory-leak.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants